package chapter5;
/****************************************************************
 * Author：icynlau
 * Description: 显示闰年
 * Date:2021/4/3
 * ***************************************************************
 */
public class exc5_27 {
	public static void main(String[] args) {
		int base=0;
		int count=0;
		for(int i=101;i<=2100;i++) {
			if(i%4==0&&i%100!=0||i%400==0) {
				count++;
				System.out.print(i+"  ");
			}
			if(count%10==0&&count!=base) {
				System.out.print("\n");
				base+=10;
			}
		}
		
		System.out.print("\nThere are "+count+"  Leap years.");
	}

}
